home *** CD-ROM | disk | FTP | other *** search
/ Champak 141 / (Vol 141) Oct 17 2011.iso / Games / flight-of-the-museum.swf / scripts / engine / levelData / Level_07.as < prev    next >
Encoding:
Text File  |  2011-10-17  |  2.2 KB  |  75 lines

  1. package engine.levelData
  2. {
  3.    import copy.CopyBank;
  4.    import engine.WorldScene;
  5.    import engine.dynamicObjects.*;
  6.    
  7.    public class Level_07 extends LevelData
  8.    {
  9.        
  10.       
  11.       public function Level_07()
  12.       {
  13.          super();
  14.          _goalParameters = new Array();
  15.       }
  16.       
  17.       override public function buildLevel() : *
  18.       {
  19.          var i:* = undefined;
  20.          var tablet:* = undefined;
  21.          var gTabs:Number = NaN;
  22.          var spacing:Number = NaN;
  23.          var fuelIcon:* = undefined;
  24.          var goalObj:Object = null;
  25.          var missionObj:Object = null;
  26.          var indian:* = undefined;
  27.          super.buildLevel();
  28.          gTabs = 20;
  29.          spacing = 150;
  30.          for(i = 0; i < gTabs; i++)
  31.          {
  32.             tablet = new TabletPiece();
  33.             tablet.x = 400 + i * spacing;
  34.             tablet.y = 450 + Math.sin(i * 0.2) * 350;
  35.             WorldScene.Instance.GameplayObjects.push(tablet);
  36.          }
  37.          for(i = 0; i < gTabs / 1.8; i++)
  38.          {
  39.             indian = new Indian();
  40.             indian.x = 400 + i * (spacing * 1.8);
  41.             indian.y = 710;
  42.             indian.LobMode = true;
  43.             WorldScene.Instance.GameplayObjects.push(indian);
  44.             WorldScene.Instance.Indians.push(indian);
  45.          }
  46.          fuelIcon = new FuelIcon();
  47.          fuelIcon.x = 4000;
  48.          fuelIcon.y = 120;
  49.          WorldScene.Instance.GameplayObjects.push(fuelIcon);
  50.          fuelIcon = new FuelIcon();
  51.          fuelIcon.x = 5000;
  52.          fuelIcon.y = 100;
  53.          WorldScene.Instance.GameplayObjects.push(fuelIcon);
  54.          _missionDescription = CopyBank.Instance.MissionDesc_Tablets;
  55.          goalObj = {
  56.             "Type":"Tablet",
  57.             "Count":gTabs
  58.          };
  59.          _goalParameters.push(goalObj);
  60.          missionObj = {
  61.             "Description":_missionDescription,
  62.             "BoundsX":_missionBoundsX,
  63.             "BoundsHint":_missionBoundsHint,
  64.             "GoalParamaters":_goalParameters,
  65.             "PrimaryGoalType":"Tablets",
  66.             "StartLoc":{
  67.                "x":50,
  68.                "y":600
  69.             }
  70.          };
  71.          WorldScene.Instance.setMissionDetails(missionObj);
  72.       }
  73.    }
  74. }
  75.